#ifndef DISTANCE_H
#define DISTANCE_H

#include <avr/io.h>

#define ADNS_RESET PB0
#define ADNS_PD PB1
#define ADNS_CS PB2
#define ADNS_MOSI PB3
#define ADNS_MISO PB4
#define ADNS_SCK PB5

unsigned char adns_id;
unsigned char adns_inv_id;


void distance_init(void);
void spi_master_init(void);
void adns_init(void);
char spi_master_transmit(unsigned char, unsigned char);
char adns_chk_serial(void);

#endif /* DISTANCE_H */
